import Home from "../pages/home";
import Add from "../pages/add";
import Detail from "../pages/detail";
import { useRoutes } from 'react-router-dom';

const routeConfig = [
  {
    path: '/',
    element: <Home />
  },
  {
    path: '/add',
    element: <Add />
  },
  {
    path: '/detail',
    element: <Detail />
  }
];

const Router = () => {
  return useRoutes(routeConfig);
};

export default Router;
